package org.van.financial.service.security;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.van.financial.dao.SecurityDao;
import org.van.financial.model.SecurityDomain;

import java.util.List;

@Service
public class SecurityServiceImpl implements SecurityService{

    @Autowired
    private SecurityDao securityDao;

    @Override
    public List<SecurityDomain> getSecurityByCond(String security_name) {
        return securityDao.getSecurityByCond(security_name);
    }

    @Override
    public List<SecurityDomain> getSecurityById(Integer uuid) {
        return securityDao.getSecurityById(uuid);
    }

    @Override
    public void deleteSecurityById(Integer uuid){
        securityDao.deleteSecurityById(uuid);
    }

    @Override
    public void addNewSecurity(SecurityDomain security){
        securityDao.addNewSecurity(security);
    }

}
